﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace SharpPopulatorLib
{

    public class IntProperties
    {

        #region Atribites

        private Boolean _Consecutive = false;
        private Int32 _Start = 0;
        private Int32 _End = 0;
        private Boolean _PrimaryKey;

        #endregion

        #region Properties

        [Category("Properties"), Description("Get or set if the value must be like a PrimaryKey values (1, 2, 3, 4 ... more or less)")]
        public Boolean Consecutive 
        {
            get
            { return _Consecutive; }
            set
            { _Consecutive = value; }
        }

        [Category("Properties"), Description("Get or set the number which the serie must start")]
        public Int32 Start 
        { 
            get
            { return _Start; }
            set
            {
                if (End > 0)
                { End = value + _End; }
                _Start = value;
            }
        }

        [Category("Properties"), Description("Get or set the number which the serie must end")]
        public Int32 End 
        { 
            get
            { return _End; }
            set
            { _End = value; }
        }

        [Category("Properties"), Description("Get or set a boolean value that indicates if the field hast an Primary key atribute")]
        public Boolean PrimaryKey 
        {
            get
            { return _PrimaryKey; }
            set
            { _PrimaryKey = value; }
        }

        #endregion

        #region Constructors

        /// <summary>
        /// 
        /// </summary>
        public IntProperties()
        { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Start"></param>
        /// <param name="End"></param>
        public IntProperties(Boolean Consecutive, Int32 Start, Int32 End, Boolean PrimaryKey)
        { 
            //
            _Consecutive = Consecutive;
            _Start = Start;
            _End = End;
            _PrimaryKey = PrimaryKey;
        }
        
        #endregion

    }

    public class EncriptationProperties
    {

        #region Atributes

        //private Boolean _RandomEncriptation = false;
        //private EncriptationType _EncriptationType;

        #endregion

        #region Properties

        //[Category("Properties"), Description("")]
        //public Boolean RandomEncriptation { get; set; }
        
        [Category("Properties"), Description("")]
        public EncripterType Encriptator { get; set; }

        #endregion
        
    }

    public class DateProperties
    {

        #region Atributes

        //Boolean _UseCurrentDate = true;
        //Date _Date;

        #endregion

        #region Properties

        [Category("Properties"), Description("")]
        public Boolean UseCustomDate { get; set; }

        [Category("Properties"), Description("")]
        public DateTime CustomDate { get; set; }

        #endregion

    }

    public class DomainProperties
    {

        #region Atributes

        //private DomainType _DomainName;
        //private String _Other;

        #endregion

        #region Properties

        [Category("Properties"), Description("")]
        public DomainType DomainName { get; set; }

        [Category("Properties"), Description("")]
        public String CustomDomainName { get; set; }

        #endregion

    }

    public class StringProperties
    {

        #region Atributes

        private StringsExpressionsType _StringExpressionsType;
        //private EncriptationProperties _EncriptationType = new EncriptationProperties();

        #endregion

        #region Properties

        [Category("Properties"), Description("")]
        public StringsExpressionsType ExpressionType 
        {
            get
            { return _StringExpressionsType; }
            set
            { _StringExpressionsType = value; }
        }

        //[Category("Sub-Properties"), Description("")]
        //public EncriptationProperties EncriptationType
        //{ 
        //    get
        //    { return _EncriptationType; }
        //    set
        //    {
        //        if (ExpressionType != StringsExpressionsType.Password)
        //        { throw new ArgumentException("Not allow!"); }
        //    }
        //}

        #endregion

        #region Constructores

        /// <summary>
        /// 
        /// </summary>
        /// <param name="StringExpressionsType"></param>
        public StringProperties(StringsExpressionsType StringExpressionsType)
        { 
            //
            _StringExpressionsType = StringExpressionsType;
        }

        #endregion

    }

}
